package com.xiaoyao.myframeapp.core;

import com.xiaoyao.myframeapp.core.Exception.ErrorType;

import java.io.Serializable;

/**
 * @author Administrator
 * @Author xiaoyao
 * @Email xiao80206040@qq.com
 * @Explain
 * @date 2018/7/3 0003
 */
public class BaseEntity<E> implements Serializable {

//    @SerializedName("code")
    private int code;
//    @SerializedName("msg")
    private String msg;
//    @SerializedName("data")
    private E data;

    public boolean isSuccess() {
        return code == ErrorType.SUCCESS;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public E getData() {
        return data;
    }

    public void setData(E data) {
        this.data = data;
    }
}

